package com.ydl.learning.scala

/**
  * 包对象的定义
  * 注意语法，package定义到上一级包，package object的name定义的是本级的package name
  *
  * @author ydl
  * @since 2021/3/19
  */
package object packageobject {
  val planted = List(Apple, Plum, Banana)
  def showFruit(fruit: Fruit): Unit = {
    println(s"${fruit.name}s are ${fruit.color}")
  }
}